
import { matchRoutes } from "react-router"
import RoutesMenu from "../router/routerConfig"
import { Router1 } from "../router/routerConfig"



export const findActiveMenu = (pathname: string): any => {
    console.log(pathname)
    console.log(matchRoutes(Router1, pathname))
    const breadcrnumbs = matchRoutes(Router1, pathname)?.map((item: any, index) => {
        return {
            path: item.pathname,
            name: item.route.name
        }
    })
    return breadcrnumbs
}